package com.prp.gwt.client.user.home;

import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.prp.gwt.client.ClientConstants;
import com.prp.gwt.client.user.php.PHPListener;
import com.prp.gwt.client.widgets.UserBarPanel;
import com.prp.gwt.client.widgets.user.home.MsgBoardRemindPanel;

public class HomeHistoryHandler implements ValueChangeHandler<String> {

	public static final String INIT_VALUE = "";
	
	@Override
	public void onValueChange(ValueChangeEvent<String> event) {
		String token = event.getValue();
		if(token.isEmpty()){
			UserBarPanel.getInstance().selectTab(ClientConstants.INDEX_HOME);
			MsgBoardRemindPanel.getInstance().init();
			PHPListener.getInstance().getLatestState(-1);
			PHPListener.getInstance().getUserRecommendation();
			PHPListener.getInstance().getUserArticalRecommend();
			PHPListener.getInstance().getUncheckMessage();
		}
	}

}
